<template>
  <div id="app">
    <router-view v-if="isRouterAlive"></router-view>
  </div>
</template>

<script>
export default {
  name: "app",
  provide() {
    return {
      reload: this.reload
    };
  },
  data() {
    return {
      isRouterAlive: true
    };
  },
  methods: {
    reload() {
      this.isRouterAlive = false;
      this.$nextTick(function() {
        this.isRouterAlive = true;
      });
    }
  }
};
</script>

<style scoped lang="less">
@import "~vux/src/styles/reset.less";
body {
  background-color: #fbf9fe;
}
#app .vux-header {
  background: none;
}
#app button.weui-btn {
  background: #8239d1;
  color: #fff;
  border-radius: 0.4rem;
}
</style>
